use openTempFile from file-io
authorJoey Hess <joeyh@joeyh.name>
Tue, 21 Jan 2025 21:00:37 +0000 (17:00 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 22 Jan 2025 15:41:43 +0000 (11:41 -0400)
commit793ddecd4b72a5e4746b3b426d3bca400737118b
treedd24028e17bb7ab10d154f862aeff055d56b6af0
parent1faa3af9cd074c61445503032b0dcf2c01a6f801
use openTempFile from file-io

And follow-on changes.

Note that relatedTemplate was changed to operate on a RawFilePath, and
so when it counts the length, it is now the number of bytes, not the
number of code points. This will just make it truncate shorter strings
in some cases, the truncation is still unicode aware.

When not building with the OsPath flag, toOsPath . fromRawFilePath and
fromRawFilePath . fromOsPath do extra conversions back and forth between
String and ByteString. That overhead could be avoided, but that's the
non-optimised build mode, so didn't bother.

Sponsored-by: unqueued
46 files changed:
Annex/AdjustedBranch/Merge.hs
Annex/Branch.hs
Annex/Hook.hs
Annex/Ingest.hs
Annex/Link.hs
Annex/Proxy.hs
Annex/ReplaceFile.hs
Annex/YoutubeDl.hs
Assistant/DaemonStatus.hs
Assistant/Install.hs
Assistant/Ssh.hs
Assistant/Threads/WebApp.hs
Assistant/Upgrade.hs
Assistant/WebApp/Configurators/Ssh.hs
CmdLine/GitRemoteAnnex.hs
Command/Export.hs
Command/ImportFeed.hs
Command/Multicast.hs
Command/P2P.hs
Command/TestRemote.hs
Config/Files/AutoStart.hs
Crypto.hs
Database/Benchmark.hs
Git/HashObject.hs
Git/Hook.hs
Git/Repair.hs
Logs/File.hs
Remote/BitTorrent.hs
Remote/Directory.hs
Remote/GCrypt.hs
Remote/Git.hs
Remote/Rsync.hs
Test.hs
Test/Framework.hs
Upgrade/V1.hs
Upgrade/V2.hs
Utility/FileIO.hs
Utility/LockFile/PidLock.hs
Utility/MoveFile.hs
Utility/OsPath.hs
Utility/SshConfig.hs
Utility/StatelessOpenPGP.hs
Utility/Tmp.hs
Utility/Tmp/Dir.hs
Utility/WebApp.hs
doc/todo/RawFilePath_conversion.mdwn